<?php

namespace Common\Model;

/**
 * DealerInfoModel.class.php实例模型
 * 
 * @author zhangzhen
 * @date 2017-1-4
 */
class DealerInfoModel extends BaseModel {

    protected $trueTableName = 'tb_dealer_info';

    /**
     * 添加数据
     * @modify zhangzhen 2017-01-04
     * @param integer $userId  用户ID
     * @param string $idcard  证件号
     * @param string $idcardpath  证件照
     * @param string $headpath  用户头像
     * @return type
     */
    public function addInfo($userId, $idcard, $idcardpath, $headPath = '/Public/src/Home/image/user.png') {
        $options = array(
            'dealerlogin_id' => $userId,
            'idcard' => $idcard,
            'idcardpath' => $idcardpath,
            'headpath' => $headPath
        );
        return $this->add($options);
    }

}
